package com.ssy.lingxi.product.repository.warehouse;

import com.ssy.lingxi.product.entity.warehouse.ShopFreightSpace;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface ShopFreightSpaceRepository extends JpaRepository<ShopFreightSpace, Long> {


    /**
    * 根据仓位ID查询适用商城
    * @author wrc
    * @date 2020/7/8
    */
    List<ShopFreightSpace> findByFreightSpaceIdEquals(Long freightSpaceId);

    /**
    * 删除仓位绑定的商城
    * @author wrc
    * @date 2020/7/9
    */
    void deleteAllByFreightSpaceIdEquals(Long freightSpaceId);


    List<ShopFreightSpace> findAllByShopIdAndFreightSpaceIdIn(Long shopId,Set<Long> ids);

    List<ShopFreightSpace> findByFreightSpaceIdIn(List<Long> ids);
}
